home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16757 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.7 KB  |  61 lines

  1. Newsgroups: comp.lang.c++
  2. Path: artemis.sto.fdata.se!news
  3. From: Niklas Mellin <niklas.mellin@sto.fdata.se>
  4. Subject: Re: C++ vs Delphi
  5. Sender: news@artemis.sto.fdata.se (UseNet NetNews)
  6. Message-ID: <316E1460.569@sto.fdata.se>
  7. Date: Fri, 12 Apr 1996 08:29:20 GMT
  8. Content-Transfer-Encoding: 7bit
  9. Content-Type: text/plain; charset=us-ascii
  10. References: <4kj9ec$lji@nntp.atlanta.com>
  11. Mime-Version: 1.0
  12. X-Mailer: Mozilla 2.0 (WinNT; I)
  13. Organization: WM-data F÷rsvarsdata AB, Sweden
  14.  
  15. jbernasky@homedepot.com wrote:
  16. > My company is currently evaluating a new development environment.  It looks
  17. > like it will come down to C++ or Delphi.  As a C++ developer, I was wondering
  18. > if there are certain pitfalls associated with Delphi.  Everything that I read
  19. > in the press about Delphi is glowing, but as we all know, nothing is that
  20. > great.  In addition, any insight on how well it handles Pascal as an object
  21. > oriented language would be appreciated.  Thanks!
  22.  
  23. I use both C++ and Delphi. There is not much negative I can say about Delphi,
  24. but I think C++ is more fun to write programs in.
  25.  
  26. Delphi uses Borland's Object Pascal. The first advantage of that language
  27. compared to C++ is that it is much faster to compile and link. Currently
  28. I'm working with a quite large project (about 40 forms and 10-20 source
  29. files that are not bound to a form), it takes about 1 minute to compile it
  30. all, in C++ I guess it would take 15-20 minutes.
  31.  
  32. What I miss in Delphi is the ability to put objects on the stack. The
  33. only place where you can allocate objects in Delphi is on the heap,
  34. which can easily lead to memory leaks if you are not careful. Since
  35. there is no way of having the objects on the stack, a garbage collector
  36. would have been nice to have, but there is non in Delphi.
  37.  
  38. I also miss the ability to do function overloading, especially for the 
  39. constructors.
  40.  
  41. String handling is quite cumbersom if strings are longer than 255 
  42. characters, or if they must be convertet to and from C style strings
  43. (terminating with a '\0'). I am told that this have been inproved in 
  44. Delphi 2.0 but unfortunatly I haven't had the opportunity to look at 
  45. the new version yet.
  46.  
  47. Other things that are missing in Delphi are operator overloading, which
  48. is more of a syntactic sugar, so you can manage without it, and multiple
  49. inheritance, which is not in the language, but so far I haven't had any
  50. need of it.
  51.  
  52. If I am to choose a development environment for windows, I think I'd go
  53. for a combination of C++ and Delphi. Delphi for the uses interface, 
  54. graphics etc. and C++ for calculations and database access (using ODBC 
  55. for portability). The database support in Delphi is simple to use
  56. but I think it is too tightly bound to the user interface.
  57.  
  58. ---
  59. Niklas Mellin
  60.